version: '3.8'

services:
  nginx:
    image: nginx
    ports:
      - 80:80
    volumes:
      - './src:/var/www/html'
      - './docker/nginx/conf.d:/etc/nginx/conf.d'
  
  php:
    build:
      dockerfile: ./docker/php/Dockerfile
    volumes:
      - './src:/var/www/html'

  mysql:
    image: mysql:8
    ports:
      - '3306:3306'
    environment:
      - MYSQL_ROOT_PASSWORD=root
    volumes:
      - './docker/volumes/mysql_base:/var/lib/mysql'

  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    ports:
      - '9090:80'
    environment:
      - PMA_HOST=mysql
      - PMA_PORT=3306
